﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace 文字游戏
{
    public static class Data//基础设定
    {
        public static int r = 1, HP = 0, MP = 0, g = 0, s = 0, hs = 0, hm = 0, dj = 1;//职业r，血HP，蓝MP,力量g,速度s,回血速度hs,回魔速度hm,等级dj
        public static int djg1 = 1, djg2 = 1, djg3 = 1;//第一关，第二关，第三关
        public static string zb = "无", name1 = "";//装备
        public static string jn = "空", jnn = "空", jnnn = "空";//技能
        public static int l1, l2, l3;//技能1，技能2，技能3所消耗的蓝
        public static int jyz=0,jysx=50;//经验值,经验上限
    }
    class Program
    {

        static void Start()//初始化
        {
            Console.WriteLine("请输入角色名称：");
            Data.name1 = Console.ReadLine();
            Console.WriteLine("请选择角色职业：");
            Console.WriteLine("1.骑士    2.射手    3.贵族     4.法师    5.医生     6.刺客");
            Data.r = int.Parse(Console.ReadLine());
            switch (Data.r)
            {
                case 1: Data.HP = 9; Data.MP = 8; Data.g = 1; Data.s = 1; Data.hs = 0; Data.hm = 0; Data.zb = "无"; Data.jn = "冲锋"; Data.jnn = "空"; Data.jnnn = "空"; Data.dj = 1;Data.l1 = 2; Data.l2 = 4;Data.l3 = 8; Data.jyz = 0;Data.jysx = 50; break;
                case 2: Data.HP = 5; Data.MP = 6; Data.g = 2; Data.s = 3; Data.hs = 0; Data.hm = 0; Data.zb = "无"; Data.jn = "连射"; Data.jnn = "空"; Data.jnnn = "空"; Data.dj = 1; Data.l1 = 2; Data.l2 = 4; Data.l3 = 8; Data.jyz = 0; Data.jysx = 50; break;
                case 3: Data.HP = 7; Data.MP = 8; Data.g = 1; Data.s = 2; Data.hs = 0; Data.hm = 0; Data.zb = "无"; Data.jn = "魅力"; Data.jnn = "空"; Data.jnnn = "空"; Data.dj = 1; Data.l1 = 2; Data.l2 = 4; Data.l3 = 8; Data.jyz = 0; Data.jysx = 50; break;
                case 4: Data.HP = 5; Data.MP = 10; Data.g = 1; Data.s = 1; Data.hs = 0; Data.hm = 0; Data.zb = "无"; Data.jn = "火球"; Data.jnn = "空"; Data.jnnn = "空"; Data.dj = 1; Data.l1 = 2; Data.l2 = 4; Data.l3 = 8; Data.jyz = 0; Data.jysx = 50; break;
                case 5: Data.HP = 10; Data.MP = 5; Data.g = 1; Data.s = 1; Data.hs = 1; Data.hm = 0; Data.zb = "无"; Data.jn = "盾击"; Data.jnn = "空"; Data.jnnn = "空"; Data.dj = 1; Data.l1 = 2; Data.l2 = 4; Data.l3 = 8; Data.jyz = 0; Data.jysx = 50; break;
                case 6: Data.HP = 6; Data.MP = 5; Data.g = 3; Data.s = 2; Data.hs = 0; Data.hm = 0; Data.zb = "无"; Data.jn = "割喉"; Data.jnn = "空"; Data.jnnn = "空"; Data.dj = 1; Data.l1 = 2; Data.l2 = 4; Data.l3 = 8; Data.jyz = 0; Data.jysx = 50; break;
            }
           

        }
        static void Jie()//界面
        {
            Console.Clear();
            Console.WriteLine("|------------------------------|");
            Console.WriteLine("|             界面             |");
            Console.WriteLine("|------------------------------|");
            Console.WriteLine("|           1.初始化           |");
            Console.WriteLine("|           2.角色信息         |");
            Console.WriteLine("|           3.选择地图         |");
            Console.WriteLine("|           4.存档             |");
            Console.WriteLine("|           5.存档             |");
            Console.WriteLine("|------------------------------|");
        }
        static void Jiaose(string n, int r, int HP, int MP, int g, int s, int hs, int hm, string zb, string jn, string jnn, string jnnn, int dj)//角色信息
        {
            Console.WriteLine("角色信息：");
            Console.WriteLine("   角色姓名：   " + n);
            switch (r)
            {
                case 1: Console.WriteLine("   角色职业：   骑士"); break;
                case 2: Console.WriteLine("   角色职业：   射手"); break;
                case 3: Console.WriteLine("   角色职业：   贵族"); break;
                case 4: Console.WriteLine("   角色职业：   法师"); break;
                case 5: Console.WriteLine("   角色职业：   坦克"); break;
                case 6: Console.WriteLine("   角色职业：   刺客"); break;
            }
            Console.WriteLine("   等级：       " + dj);
            Console.WriteLine("   HP：         " + HP);
            Console.WriteLine("   MP：         " + MP);
            Console.WriteLine("   力量：       " + g);
            Console.WriteLine("   速度：       " + s);
            Console.WriteLine("   回血速度：   " + hs);
            Console.WriteLine("   回魔速度：   " + hm);
            Console.WriteLine("   装备：       " + zb);
            Console.WriteLine("   技能：       " + jn + "   " + jnn + "   " + jnnn);
            
        }
        static int jnxx(int r, int HP, int MP, int g, int s, int hs, int hm, string zb, string jn, int dj)//技能设置 职业 血 魔 力量  速度 回血 回魔 技能选择情况 技能1 技能2 技能3 等级
        {
            if (jn == "冲锋")
                return g + s;//冲锋  造成力量+速度的伤害
            if (jn == "连射")
                return 2 * g;//连续攻击两次
            if (jn == "魅力")
                return dj * 2;
            if (jn == "火球")
                return MP * 2/10 + g;
            if (jn == "盾击")
                return HP * 2 / 10 + g;
            if(jn=="割喉")
                return g+dj;
            if (jn == "青青草原")
                return dj + g;
            if (jn == "一往无前")
                return s * 3 + g;
            if (jn == "一点寒芒先至，随后枪出如龙")
                return HP * 4 / 10;
            if (jn == "三连射")
                return g * 3;
            if (jn == "肉蛋葱鸡") 
                return HP * 10 / 5;
            if (jn == "闪电风暴") 
                return MP * 10 / 5;
            if (jn == "信仰之跃")
                return g + s + dj * 10 / 6;
            if (jn == "领主权威")
                return (HP + MP) * 3 / 10;
            if (jn == "大人时代变了，并掏出了一把枪")
                return g * 5 + s * 3;
            if (jn == "吾乃铁之手，神灵猎人，受加冕者，霸主级单位")
                return HP + dj * 2;
            if (jn == "星河·创世纪·无限新星")
                return MP + g * 2;
            if (jn == "肉身限制解开·洪流·大爆炸")
                return HP * 2;
            if (jn == "暗面·深渊·地狱·罪恶之花")
                return MP * 5 / 10 + HP * 6 / 11 + g + s;
            return 0;
        }
        static void Map(int djg1, int djg2, int djg3)//地图
        {
            Console.WriteLine("请选择地图：Map1     Map2     Map3");
            int jh = int.Parse(Console.ReadLine());
            switch (jh)
            {
                case 1: Map1(djg1); break;
                case 2: Map2(djg2); break;
                case 3: Map3(djg3); break;
            }
        }
        static void Map1(int djg)//地图1，经过了第几关
        {
            Console.WriteLine("你已经进入Map1!    1    2    3");
            int d = int.Parse(Console.ReadLine());
            Console.WriteLine("你即将进入第" + d + "关");
            switch (d)
            {
                case 1: Map1to1(); break;
                case 2: Map1to2();break;
            }
        }
        static void Map2(int djg)//地图2，经过了第几关
        {
            Console.WriteLine("你已经进入Map2!");
            Console.WriteLine("你即将进入第" + djg + "关");
            switch (djg)
            {
                case 1: Map1to1(); break;
            }
        }
        static void Map3(int djg)//地图3，经过了第几关
        {
            Console.WriteLine("你已经进入Map3!");
            Console.WriteLine("你即将进入第" + djg + "关");
            switch (djg)
            {
                case 1: Map1to1(); break;
            }
        }
        static void Map1to1()//地图一，第一关
        {
            Console.WriteLine("你已经进入了第一关");
            string n1 = "弓兵";
            int r1 = 2, HP1 = 3, MP1 = 3, g1 = 2, s1 = 1, hs1 = 0, hm1 = 0, dj1 = 0;
            //一个普攻，一个技能
            int jns = 2,ll1=2,ll2=4,ll3=8,jy=20;
            string zb1 = "无", jn1 = "无", jnn1 = "无", jnnn1 = "无";
            Duizhan(Data.name1, Data.r, Data.HP, Data.MP, Data.g, Data.s, Data.hs, Data.hm, Data.zb, Data.jn, Data.jnn, Data.jnnn, Data.dj, Data.l1, Data.l2, Data.l3, n1, r1, HP1, MP1, g1, s1, hs1, hm1, zb1, jn1, jnn1, jnnn1, dj1, jns, ll1,ll2,ll3,jy) ;
        }
        static void Map1to2()//地图一，第二关
        {
            Console.WriteLine("你已经进入了第一关");
            string n1 = "羊村战神";
            int r1 = 1, HP1 = 8, MP1 = 5, g1 = 2, s1 = 1, hs1 = 0, hm1 = 0, dj1 = 2;
            //一个普攻，一个技能
            int jns = 2, ll1 = 2, ll2 = 4, ll3 = 8, jy = 20;
            string zb1 = "无", jn1 = "青青草原", jnn1 = "无", jnnn1 = "无";
            Duizhan(Data.name1, Data.r, Data.HP, Data.MP, Data.g, Data.s, Data.hs, Data.hm, Data.zb, Data.jn, Data.jnn, Data.jnnn, Data.dj, Data.l1, Data.l2, Data.l3, n1, r1, HP1, MP1, g1, s1, hs1, hm1, zb1, jn1, jnn1, jnnn1, dj1, jns, ll1, ll2, ll3, jy);
        }
        static void Duizhan(string n, int r, int HP, int MP, int g, int s, int hs, int hm, string zb, string jn, string jnn, string jnnn, int dj, int l1,int l2,int l3,string n1, int r1, int HP1, int MP1, int g1, int s1, int hs1, int hm1, string zb1, string jn1, string jnn1, string jnnn1, int dj1,int jns,int ll1,int ll2,int ll3,int jy)//对决介绍
        {
            Console.WriteLine("   角色姓名：   " + n + "       角色姓名：   " + n1);//双方的对战信息
            switch (r)//判断角色职业
            {
                case 1: Console.Write("   角色职业：   骑士"); break;
                case 2: Console.Write("   角色职业：   射手"); break;
                case 3: Console.Write("   角色职业：   贵族"); break;
                case 4: Console.Write("   角色职业：   法师"); break;
                case 5: Console.Write("   角色职业：   医生"); break;
                case 6: Console.Write("   角色职业：   刺客"); break;
            }
            switch (r1)//判断对手职业
            {
                case 1: Console.WriteLine("       角色职业：   骑士"); break;
                case 2: Console.WriteLine("       角色职业：   射手"); break;
                case 3: Console.WriteLine("       角色职业：   贵族"); break;
                case 4: Console.WriteLine("       角色职业：   法师"); break;
                case 5: Console.WriteLine("       角色职业：   医生"); break;
                case 6: Console.WriteLine("       角色职业：   刺客"); break;
            }
            Console.WriteLine("   等级：       " + dj + "       等级：       " + dj1);
            Console.WriteLine("   HP：         " + HP + "       HP：         " + HP1);
            Console.WriteLine("   MP：         " + MP + "       MP：         " + MP1);
            Console.WriteLine("   力量：       " + g + "       力量：       " + g1);
            Console.WriteLine("   速度：       " + s + "       速度：       " + s1);
            Console.WriteLine("   回血速度：   " + hs + "       回血速度：   " + hs1);
            Console.WriteLine("   回魔速度：   " + hm + "       回魔速度：   " + hm1);
            Console.WriteLine("   装备：       " + zb + "       装备：       " + zb1);
            Console.WriteLine("   技能：       " + jn + "       技能：       " + jn1);
            Console.WriteLine("是否进入战斗：1.yes  2.no");
            int zd = int.Parse(Console.ReadLine());
            if (zd == 1)//代表战斗开始
            {
                Console.WriteLine("战斗开始：");
                //角色和野怪的基础数据
                attack(Data.name1, Data.r, Data.HP, Data.MP, Data.g, Data.s, Data.hs, Data.hm, Data.zb, Data.jn, Data.jnn, Data.jnnn, Data.dj, Data.l1, Data.l2, Data.l3, n1, r1, HP1, MP1, g1, s1, hs1, hm1, zb1, jn1, jnn1, jnnn1, dj1, jns,ll1, ll2, ll3,jy);
            }

        }
        static void sj(int dj,int r)//角色升级
        {
            switch(r)
            {
                case 1:
                    Data.HP += 9; Data.MP += 6; Data.g += 1; Data.s += 2;
                    if (dj%3==0){ Data.hs++; }
                    if (dj % 5 == 0) { Data.hm++; }
                    break;
                case 2:
                    Data.HP += 5; Data.MP += 6; Data.g += 2; Data.s += 3; 
                    if (dj % 5 == 0) { Data.hs++; }
                    if (dj % 5 == 0) { Data.hm++; }
                    break;
                case 3:
                    Data.HP += 7; Data.MP += 7; Data.g += 1; Data.s += 2;
                    if (dj % 4 == 0) { Data.hs++; }
                    if (dj % 4 == 0) { Data.hm++; }
                    break;
                case 4:
                    Data.HP += 5; Data.MP += 10; Data.g += 1; Data.s += 1;
                    if (dj % 5 == 0) { Data.hs++; }
                    if (dj % 3 == 0) { Data.hm++; }
                    break;
                case 5:
                    Data.HP += 10; Data.MP += 5; Data.g += 1; Data.s += 1;
                    if (dj % 2 == 0) { Data.hs++; }
                    if (dj % 6 == 0) { Data.hm++; }
                    break;
                case 6:
                    Data.HP += 6; Data.MP += 6; Data.g += 3; Data.s += 2;
                    if (dj % 5 == 0) { Data.hs++; }
                    if (dj % 5 == 0) { Data.hm++; }
                    break;
            }
        }
        static void attack(string n, int r, int HP, int MP, int g, int s, int hs, int hm, string zb, string jn, string jnn, string jnnn, int dj, int l1, int l2, int l3,string n1, int r1, int HP1, int MP1, int g1, int s1, int hs1, int hm1, string zb1, string jn1, string jnn1, string jnnn1, int dj1,int jns,int ll1, int ll2, int ll3,int jy)//战斗对决
        {
            int h1 = HP, sd1 = s, sd2 = s1, m1 = MP, m2 = MP1,lzsm = 0;//回合对战
            int h2 = HP1;
            int cx = 0;//野怪出招的顺序
            for (int i = 0; i < 100; i++)
            {
                Console.WriteLine("第{0}回合开始！",i+1);
                if (h1 > 0 && h2 > 0)//对战双方的血都＞0
                {
                    if (sd1 >= sd2)//玩家的速度大于野怪的速度
                    {
                        //----------------------------------------------------------------------------
                        if (m1 > 0)//角色还有魔
                        {
                            Console.WriteLine("请选择技能：1   2   3   4   0");
                            int xzjn = int.Parse(Console.ReadLine());
                            switch (xzjn)
                            {
                                case 1:
                                    if (jn != "空"&&m1>=l1)//拥有技能1且蓝大于技能1所消耗的蓝
                                    {
                                        Console.Write(n + "对" + n1 + "使用了" + jn + "造成了 " + jnxx(r, HP, MP, g, s, hs, hm, zb, jn, dj));//技能伤害
                                        Console.WriteLine("点伤害"); h2 = h2 - jnxx(r,HP,MP ,g, s,hs,hm,zb, jn, dj);m1 -= l1;
                                    }
                                    else Console.WriteLine("你无法使用这个技能！"); break;
                                case 2:
                                    if (jnn != "空"&&m1>=l2)
                                    {
                                        Console.Write(n + "对" + n1 + "使用了" + jn + "造成了 " + jnxx(r, HP, MP,g, s, hs, hm, zb, jnn, dj));
                                        Console.WriteLine("点伤害"); h2 = h2 - jnxx(r, HP, MP, g, s, hs, hm, zb, jnn, dj);m1 -= l2;
                                    }
                                    else Console.WriteLine("你无法使用这个技能！"); break;
                                case 3:
                                    if (jnnn != "空"&&m1>=l3)
                                    {
                                        Console.Write(n + "对" + n1 + "使用了" + jn + "造成了 " + jnxx(r, HP, MP ,g, s, hs, hm, zb, jnnn, dj));
                                        Console.WriteLine("点伤害"); h2 = h2 - jnxx(r, HP, MP,g, s, hs, hm, zb, jnnn, dj);m1 -= l3;
                                    }
                                    else Console.WriteLine("你无法使用这个技能！"); break;
                                case 0:
                                    Console.Write(n + "对" + n1 + "使用了普攻造成了 " + g); Console.WriteLine("点伤害");h2 = h2 - g; break;
                            }//角色有魔，且技能选择结束
                        }//角色有魔回合结束
                        //
                        else//角色没魔使用普攻
                        {
                                 Console.Write(n + "对" + n1 + "使用了普攻造成了 " + g); Console.WriteLine("点伤害"); h2 = h2 - g; 
                        }//角色先手进攻回合结束
                        if (h1 <= 0)
                        {
                            lzsm = 1;
                            Console.WriteLine("你已死亡！");
                            break;//角色死亡
                        }
                        if (h2 <= 0)
                        {
                            lzsm = 2;
                            Console.WriteLine("野怪已死亡！");
                            Data.jyz = Data.jyz + jy;
                            if (Data.jyz >= Data.jysx)
                            {
                                Data.jyz = Data.jyz - Data.jysx;//经验值变为扣去的经验值
                                Data.jysx = Data.jysx + 50;//经验上限加100
                                Data.dj++;
                                sj(Data.dj, r);
                                if (Data.dj == 4)
                                {
                                    jnsj(r, Data.dj);//获得新技能，职业    等级
                                }
                                if (Data.dj == 7)
                                {
                                    jnsj(r, Data.dj);
                                }
                            }
                            break;//野怪死亡
                        }
                        //------------------------------------------------------------------------------------------------------
                        //
                        cx = i % jns;//野怪开始进攻，以及使用的技能
                        if (m2 > 0)//野怪有魔的情况
                        {
                            switch (cx)
                            {
                                case 0: Console.WriteLine(n1 + "对你使用了普攻，造成了" + g1 + "点伤害！"); h1 = h1 - g; break;
                                case 1: Console.WriteLine(n1 + "对你使用了" + jn1 + "，造成了" + jnxx(r, HP1, MP1, g1, s1, hs1, hm1, zb1, jn1, dj) + "点伤害！"); h1 = h1 - jnxx(r, HP1, MP1, g1, s1, hs1, hm1, zb1, jn1, dj); m2 -= ll1; break;
                                case 2: Console.WriteLine(n1 + "对你使用了" + jnn1 + "，造成了" + jnxx(r, HP1, MP1, g1, s1, hs1, hm1, zb1, jnn1, dj) + "点伤害！"); h1 = h1 - jnxx(r, HP1, MP1, g1, s1, hs1, hm1, zb1, jnn1, dj); m2 -= ll2; break;
                                case 3: Console.WriteLine(n1 + "对你使用了" + jnnn1 + "，造成了" + jnxx(r, HP1, MP1, g1, s1, hs1, hm1, zb1, jnnn1, dj) + "点伤害！"); h1 = h1 - jnxx(r, HP1, MP1, g1, s1, hs1, hm1, zb1, jnnn1, dj); m2 -= ll3; break;
                            }//野怪进攻结束
                        }
                        else
                        {
                            Console.Write(n1 + "对" + n + "使用了普攻造成了 " + g1); Console.WriteLine("点伤害"); h2 = h2 - g;
                        }
                        Console.WriteLine("-------------------------------------");//角色先手，一个总回合结束
                        if (h1 <= 0)
                        {
                            lzsm = 1;
                            Console.WriteLine("你已死亡！");
                            break;//角色死亡
                        }
                        if (h2 <= 0)
                        {
                            lzsm = 2;
                            Console.WriteLine("野怪已死亡！");
                            Data.jyz = Data.jyz + jy;
                            if (Data.jyz >= Data.jysx)
                            {
                                Data.jyz = Data.jyz - Data.jysx;//经验值变为扣去的经验值
                                Data.jysx = Data.jysx + 100;//经验上限加100
                                Data.dj++;
                                sj(Data.dj, r);
                                if (Data.dj == 4)
                                {
                                    jnsj(r, Data.dj);//获得新技能，职业    等级
                                }
                                if (Data.dj == 7)
                                {
                                    jnsj(r, Data.dj);
                                }
                            }
                            break;//野怪死亡
                        }
                    }
                    //----------------------------------------------------------------------------------------------------------------
                    //----------------------------------------------------------------------------------------------------------------
                    //野怪先进攻的情况
                    else
                    {
                        if (m2 > 0)//野怪有魔
                        {
                            cx = i % jns;//野怪开始进攻，以及使用的技能
                            switch (cx)
                            {
                                case 0: Console.WriteLine(n1 + "对你使用了普攻，造成了" + g1 + "点伤害！"); h1 = h1 - g; break;
                                case 1: Console.WriteLine(n1 + "对你使用了" + jn1 + "，造成了" + jnxx(r, HP1, MP1, g1, s1, hs1, hm1, zb1, jn1, dj) + "点伤害！"); h1 = h1 - jnxx(r, HP1, MP1, g1, s1, hs1, hm1, zb1, jn1, dj); m2 -= ll1; break;
                                case 2: Console.WriteLine(n1 + "对你使用了" + jnn1 + "，造成了" + jnxx(r, HP1, MP1, g1, s1, hs1, hm1, zb1, jnn1, dj) + "点伤害！"); h1 = h1 - jnxx(r, HP1, MP1, g1, s1, hs1, hm1, zb1, jn1, dj); m2 -= ll2; break;
                                case 3: Console.WriteLine(n1 + "对你使用了" + jnnn1 + "，造成了" + jnxx(r, HP1, MP1, g1, s1, hs1, hm1, zb1, jnnn1, dj) + "点伤害！"); h1 = h1 - jnxx(r, HP1, MP1, g1, s1, hs1, hm1, zb1, jn1, dj); m2 -= ll3; break;
                            }
                        }
                        //没魔进攻
                        else 
                        {
                            Console.Write(n1 + "对" + n + "使用了普攻造成了 " + g1); Console.WriteLine("点伤害"); h2 = h2 - g; 
                        }
                        //野怪进攻结束
                        //
                        if (h1 <= 0)
                        {
                            lzsm = 1;
                            Console.WriteLine("你已死亡！");
                            break;//角色死亡
                        }
                        if (h2 <= 0)
                        {
                            lzsm = 2;
                            Console.WriteLine("野怪已死亡！");
                            Data.jyz = Data.jyz + jy;
                            if (Data.jyz >= Data.jysx)
                            {
                                Data.jyz = Data.jyz - Data.jysx;//经验值变为扣去的经验值
                                Data.jysx = Data.jysx + 100;//经验上限加100
                                Data.dj++;
                                sj(Data.dj, r);
                                if (Data.dj == 4)
                                {
                                    jnsj(r, Data.dj);//获得新技能，职业    等级
                                }
                                if (Data.dj == 7)
                                {
                                    jnsj(r, Data.dj);
                                }
                            }
                            break;//角色死亡
                        }
                        //----------------------------------------------------------------------------------------------------------------
                        if (m1 > 0)//角色还有魔
                        {
                            Console.WriteLine("请选择技能：1   2   3   4   0");
                            int xzjn = int.Parse(Console.ReadLine());
                            switch (xzjn)
                            {
                                case 1:
                                    if (jn != "空" && m1 >= l1)
                                    {
                                        Console.Write(n + "对" + n1 + "使用了" + jn + "造成了 " + jnxx(r, HP, MP, g, s, hs, hm, zb, jn, dj));
                                        Console.WriteLine("点伤害"); h2 = h2 - jnxx(r, HP, MP, g, s, hs, hm, zb, jn, dj); m1 -= l1;//野怪减血
                                    }
                                    else Console.WriteLine("你无法使用这个技能！"); break;
                                case 2:
                                    if (jnn != "空" && m1 >= l2)
                                    {
                                        Console.Write(n + "对" + n1 + "使用了" + jn + "造成了 " + jnxx(r, HP, MP, g, s, hs, hm, zb, jnn, dj));
                                        Console.WriteLine("点伤害"); h2 = h2 - jnxx(r, HP, MP, g, s, hs, hm, zb, jnn, dj); m1 -= l2;
                                    }
                                    else Console.WriteLine("你无法使用这个技能！"); break;
                                case 3:
                                    if (jnnn != "空" && m1 >= l3)
                                    {
                                        Console.Write(n + "对" + n1 + "使用了" + jn + "造成了 " + jnxx(r, HP, MP, g, s, hs, hm, zb, jnnn, dj));
                                        Console.WriteLine("点伤害"); h2 = h2 - jnxx(r, HP, MP, g, s, hs, hm, zb, jnnn, dj); m1 -= l3;
                                    }
                                    else Console.WriteLine("你无法使用这个技能！"); break;
                                case 0:
                                    Console.Write(n + "对" + n1 + "使用了普攻造成了 " + g); Console.WriteLine("点伤害"); h2 = h2 - g; break;
                            }//角色技能选择结束
                        }
                        //
                        else
                        {
                            Console.Write(n1 + "对" + n + "使用了普攻造成了 " + g1); Console.WriteLine("点伤害"); h2 = h2 - g;
                        }//角色进攻结束
                        if (h1 <= 0)
                        {
                            lzsm = 1;
                            Console.WriteLine("你已死亡！");
                            break;//角色死亡
                        }
                        if (h2 <= 0)
                        {
                            lzsm = 2;
                            Console.WriteLine("野怪已死亡！");
                            Data.jyz = Data.jyz + jy;
                            if(Data.jyz>=Data.jysx)
                            {
                                Data.jyz = Data.jyz - Data.jysx;//经验值变为扣去的经验值
                                Data.jysx = Data.jysx + 100;//经验上限加100
                                Data.dj++;
                                sj(Data.dj, r);
                                if(Data.dj==4)
                                {
                                    jnsj(r,Data.dj);//获得新技能，职业    等级
                                }
                                if(Data.dj==7)
                                {
                                    jnsj(r, Data.dj);
                                }
                            }
                            break;//角色死亡
                        }
                        Console.WriteLine("-------------------------------------");
                    }
                }
                if (lzsm == 1 || lzsm == 2)
                    break;//结束循环
            }
        }
        static void jnsj(int r,int dj)//升级后获得的技能
        {
            switch(r)
            {
                case 1:
                    if (dj == 4) { Data.jnn = "一往无前"; }
                    if (dj == 7) { Data.jnnn = "一点寒芒先至，随后枪出如龙"; }
                    break;
                case 2:
                    if (dj == 4) { Data.jnn = "三连射"; }
                    if (dj == 7) { Data.jnnn = "大人时代变了，并掏出了一把枪"; }
                    break;
                case 3:
                    if (dj == 4) { Data.jnn = "领主权威"; }
                    if (dj == 7) { Data.jnnn = "吾乃铁之手，神灵猎人，受加冕者，霸主级单位"; }
                    break;
                case 4:
                    if (dj == 4) { Data.jnn = "闪电风暴"; }
                    if (dj == 7) { Data.jnnn = "星河·创世纪·无限新星"; }
                    break;
                case 5:
                    if (dj == 4) { Data.jnn = "肉蛋葱鸡"; }
                    if (dj == 7) { Data.jnnn = "肉身限制解开·洪流·大爆炸"; }
                    break;
                case 6:
                    if (dj == 4) { Data.jnn = "信仰之跃"; }
                    if (dj == 7) { Data.jnnn = "暗面·深渊·地狱·罪恶之花"; }
                    break;
            }
        }
        static void Main(string[] args)//主程序
        {
            for (int i = 0; i < 100; i++)
            {
                Jie();
                int xj = int.Parse(Console.ReadLine());
                switch (xj)
                {
                    //初始化
                    case 1: Start(); break;
                    //角色信息
                    case 2: Jiaose(Data.name1, Data.r, Data.HP, Data.MP, Data.g, Data.s, Data.hs, Data.hm, Data.zb, Data.jn, Data.jnn, Data.jnnn, Data.dj);  break;
                    //地图
                    case 3: Map(Data.djg1, Data.djg2, Data.djg3);  break;
                }
                Console.WriteLine("冒险是否继续？  1.yes    2.no");
                int pd = int.Parse(Console.ReadLine());
                if (pd != 1)
                    break;
            }
        }
    }
}

